package com.remon.quartz.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;

/**
 * 客户端请求对象
 *
 * @author remon
 * @create 2018-08-16 15:27
 **/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class CustomerReq {

    private String appid;
    private String appsecret;

    public boolean validationSecret(String secret) throws Exception {
        if (StringUtils.isEmpty(this.appsecret) || !secret.equals(appsecret)) {
            throw new Exception("签名校验失败");
        }
        return true;
    }
}
